package org.dce.screencapturer.actions.objects;

import java.awt.event.ActionEvent;

import org.dce.screencapturer.editors.TextColorEditor;
import org.dce.screencapturer.objects.DrawingObject;
import org.dce.screencapturer.objects.ShapeObject;
import org.dce.screencapturer.util.IconFactory;

public class TextColorAction 
	extends ObjectAction {

	private static final long serialVersionUID = -3435531096082874554L;
	
	public TextColorAction(){
		super("categories.text","actions.textColor",IconFactory.getIcon("/images/fill.png"));
	}
	
	@Override
	public void actionPerformed(ActionEvent e) {
		TextColorEditor editor = new TextColorEditor((ShapeObject)getObject());
		editor.showEditor();
	}

	@Override
	protected boolean acceptObject(DrawingObject anObject) {
		return anObject instanceof ShapeObject;
	}

}
